/**
 * C Programming: A Modern Approach
 *
 * version: 2nd
 * author: K.N.King
 * http://knking.com/books/c2
 */

#include <stdio.h>

/**
 * Calculate the result of ((((3 * x - 2) * x - 5) * x - 1) * x + 7) * x - 6
 */

int main(void) {
    float x;
    float result;
    printf("Enter the value of x: ");
    scanf("%f", &x);

    // ((((3 * x - 2) * x - 5) * x - 1) * x + 7) * x - 6
    result = ((((3 * x - 2) * x - 5) * x - 1) * x + 7) * x - 6;
    printf("The result is: %.2f\n", result);

    return 0;
}

/*
output:
Enter the value of x: 2
The result is: 28.00
*/